home *** CD-ROM | disk | FTP | other *** search
- package icontrols.DataList;
-
- import com.ms.wd.app.Message;
- import com.ms.wd.core.Event;
- import com.ms.wd.ui.Control;
- import com.ms.wd.ui.CreateParams;
-
- class ComboDropDown extends Control {
- Control m_ctl = null;
-
- public ComboDropDown() {
- ((Control)this).setVisible(false);
- }
-
- protected CreateParams getCreateParams() {
- CreateParams cp = super.getCreateParams();
- cp.exStyle |= 8;
- cp.style = -2105540608;
- return cp;
- }
-
- protected void wndProc(Message msg) {
- switch (msg.msg) {
- case 33:
- msg.result = 3;
- break;
- default:
- super.wndProc(msg);
- }
-
- }
-
- public void setComponent(Control ctl) {
- if (this.m_ctl != null) {
- ((Control)this).remove(this.m_ctl);
- this.m_ctl = null;
- }
-
- if (ctl != null) {
- ((Control)this).add(ctl);
- this.m_ctl = ctl;
- this.m_ctl.setBounds(((Control)this).getClientRect());
- }
-
- }
-
- protected void onResize(Event e) {
- if (this.m_ctl != null) {
- this.m_ctl.setBounds(((Control)this).getClientRect());
- }
-
- super.onResize(e);
- }
- }
-